import 'dart:async';

import 'package:flutter/services.dart';

class NfcSbk {
  static const MethodChannel _channel =
      const MethodChannel('nfc_sbk');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }



  //写入apdu指令
  static Future<String> writeIsoDep(List<String> args)  async {
    final String result = await _channel.invokeMethod('writeIsoDep',args);
    return result;
  }
  //写入apdu指令
  static Future<String> stopNFC()  async {
    final String result = await _channel.invokeMethod('stopNFC');
    return result;
  }
  //判断NFC状态
  static Future<String> checkNFC()  async {
    final String result = await _channel.invokeMethod('checkNFC');
    return result;
  }
  //sm4加密
  static Future<String> encryptData_ECB(List<String> args)  async {
    final String result = await _channel.invokeMethod('encryptDataBySM4',args);
    return result;
  }
  //sm4解密
/*  static Future<String> decryptData_ECB(List<String> args)  async {
    final String result = await _channel.invokeMethod('decryptDataBySM4',args);
    return result;
  }*/
}
